﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace qlhocsinh
{
    public partial class Frdangnhap : Form
    {
        public Frdangnhap()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (txttendangnhap.Text == "admin" && txtmatkhau.Text == "123")
            {
                Frmain h = new Frmain();
                h.ShowDialog();
            }
            else
            {
                MessageBox.Show("tài khoản hoặc mật khẩu sai");
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            DialogResult traloi;
            traloi = MessageBox.Show("Chắc không?", "Trả lời",
                MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
            if (traloi == DialogResult.OK)
                Application.Exit();
        }
    }
}
